package enum

type OrderSide string

const (
	SideBuy OrderSide = "BUY"
	SideSell OrderSide = "SELL"
)

func (o OrderSide) String() string {
	switch o {
	case SideBuy:
		return "BUY"
	case SideSell:
		return "SELL"
	default:
		return "unknown"
	}
}

func (o OrderSide) Valid() bool {
	if o.String() == "unknown" {
		return false
	}
	return true
}